<template>
  <Child />
</template>

<script setup lang="ts">
import { provide } from "vue";
import { ref } from "vue";
// 引入子组件
import Child from "./Child.vue";

let num = ref<number>(0);
// 声明provide
provide("provideState", {
  num,
  numAdd: () => {
    num.value++;
  },
});
</script>
